﻿package com.winmastergames.lolgame 
{
	import flash.display.MovieClip;
	import flash.display.Stage;
	import flash.events.TimerEvent;
	import flash.utils.Timer;
	/**
	 * ...
	 * @author     Advanced Flash Engine in ActionScript 3.
    Copyright (C) 2009  Dean Gardiner, Taylor Lodge

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
	 */
	public class screenMessage extends MovieClip
	{
		public var timer:Timer;
		public function screenMessage(message:String, stage:Stage,time:Number) 
		{
			txtMsg.text = message;
			x = stage.stageWidth / 2;
			y = stage.stageHeight / 2;
			stage.addChild(this);
			timer = new Timer(time, 0);
			timer.addEventListener(TimerEvent.TIMER, timerFire);
			timer.start();
		}
		public function timerFire(e:TimerEvent)
		{
			visible = false;
			timer.stop();
		}
		
	}

}